Timestamp

public interface Timestamp

A point in time independent of any time zone or calendar, represented as milliseconds in UTC UNIX Epoch time.

Functions

Link copied to clipboard
public static Timestamp fromInstant(Instant instant)
Creates a Timestamp from the given Instant.
Link copied to clipboard
public static Timestamp fromMicros(long microseconds)
Creates a Timestamp from the number of microseconds of UTC time since Unix epoch 1970-01-01T00:00:00Z.
Link copied to clipboard
public static Timestamp fromMillis(long milliseconds)
Creates a Timestamp from the number of milliseconds of UTC time since Unix epoch 1970-01-01T00:00:00Z.
Link copied to clipboard
public static Timestamp fromSeconds(long seconds)
Creates a Timestamp from the number of seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z.
Link copied to clipboard
public Instant toInstant()
Converts this Timestamp to an Instant.
Link copied to clipboard
public long toMicros()
Returns the number of microseconds of UTC time since Unix epoch 1970-01-01T00:00:00Z.
Link copied to clipboard
public long toMillis()
Returns the number of milliseconds of UTC time since Unix epoch 1970-01-01T00:00:00Z.
Link copied to clipboard
public long toSeconds()
Returns the number of seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z.